Add automatic dark theme#39
Draft
g4bri3lDev wants to merge 1 commit into
Draft
Conversation
Follow the OS setting via prefers-color-scheme (no toggle, no JS). Most of the site is built on the --od-*/--fg/--bg token layer, so a dark override of the base color tokens in colors_and_type.css cascades to every page that uses var(...); inline styles and callouts were already tokenized or intentionally fixed (e-paper display-color swatches), so no per-page migration was needed. - colors_and_type.css: dark values for ink/paper/brand/semantic tokens and black-based shadows; swap the header logo mark to a white-outline variant via the `content` property so it tracks live scheme changes (an <img>-referenced SVG's own media query only re-renders on reload). - logo-mark.svg: self-adapting outline (keeps the favicon in sync on load). - logo-mark-dark.svg: static white-outline variant for the live header swap. - common.css: align the legacy pages' dark palette with the main tokens and use dark ink for text on the accent button. Verified in Chrome (both schemes, live switching): no light-on-dark leaks and no dark-mode contrast regressions across all pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow the OS setting via prefers-color-scheme (no toggle, no JS). Most of the site is built on the --od-*/--fg/--bg token layer, so a dark override of the base color tokens in colors_and_type.css cascades to every page that uses var(...); inline styles and callouts were already tokenized or intentionally fixed (e-paper display-color swatches), so no per-page migration was needed.
contentproperty so it tracks live scheme changes (anVerified in Chrome (both schemes, live switching): no light-on-dark leaks and no dark-mode contrast regressions across all pages.